.rare-words-input__match-words {
  display: flex;
  flex-flow: row nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  padding: calc(20 * var(--px, 1px)) calc(24 * var(--px, 1px))
    calc(20 * var(--px, 1px)) calc(8 * var(--px, 1px));
  background: #f5f5f5;
  overflow: hidden;

  &-wrap {
    min-height: calc(96 * var(--px, 1px));

    &::before {
      content: '';
      display: block;
      position: absolute;
      top: calc(-1 * var(--px, 1px));
      left: 0;
      background: #ccc;
      width: 100%;
      height: calc(1 * var(--px, 1px));
      transform: scaleY(0.5);
      transform-origin: 0 0;
    }
  }

  &-absolute {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    z-index: 10000;
    padding-left: 0;
    overflow: auto;
  }

  &-sticky {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
  }

  &-words {
    flex: 1;
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    height: calc(56 * var(--px, 1px));
    white-space: nowrap;
    box-sizing: border-box;
    margin-right: calc(-32 * var(--px, 1px));
    padding-right: calc(42 * var(--px, 1px));
  }

  &-words-all {
    height: auto;
    margin-top: calc(-20 * var(--px, 1px));
    position: relative;
    padding-left: calc(8 * var(--px, 1px));
    padding-right: calc(42 * var(--px, 1px));

    &::after {
      content: '';
      display: block;
      position: absolute;
      left: calc(-64 * var(--px, 1px));
      bottom: 0;
      background: #ccc;
      width: 100%;
      height: calc(1 * var(--px, 1px));
      transform: scaleY(0.5);
      transform-origin: 0 0;
    }
  }

  &-word {
    color: var(--text-color);
    width: calc(73 * var(--px, 1px));
    padding-left: calc(16 * var(--px, 1px));
    padding-right: calc(16 * var(--px, 1px));
    box-sizing: border-box;
  }

  &-word-all {
    padding-top: calc(20 * var(--px, 1px));
    padding-bottom: calc(20 * var(--px, 1px));
    position: relative;

    &::after {
      content: '';
      display: block;
      position: absolute;
      left: calc(-20 * var(--px, 1px));
      bottom: 0;
      background: #ccc;
      width: 100%;
      height: calc(1 * var(--px, 1px));
      transform: scaleY(0.5);
      transform-origin: 0 0;
    }
  }

  &-word-inner {
    font-size: calc(41 * var(--px, 1px));
    line-height: calc(57 * var(--px, 1px));
    user-select: none;
    color: var(--text-color);

    &:active {
      color: var(--active-color);
    }

    &:hover {
      color: var(--active-color);
    }
  }

  &-right {
    width: calc(48 * var(--px, 1px));
    height: calc(48 * var(--px, 1px));
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: calc(4 * var(--px, 1px));
    color: #333;
  }

  &-overflow {
    &::before {
      content: '';
      display: block;
      width: calc(12 * var(--px, 1px));
      height: 100%;
      background: linear-gradient(to right, transparent, #d8d8d8);
      position: absolute;
      left: calc(-32 * var(--px, 1px));
    }
  }

  &-hidden {
    visibility: hidden;
    position: absolute;
    top: -9999px;
    left: -9999px;
    width: calc(73 * var(--px, 1px));
    padding-left: calc(16 * var(--px, 1px));
    padding-right: calc(16 * var(--px, 1px));
    box-sizing: border-box;
  }
}
